#ifndef CENTERKEYDIALOG_H
#define CENTERKEYDIALOG_H

#include <QtGui/QDialog>

#include "src/cdatabase.h"

namespace Ui {
    class CEnterKeyDialog;
}

class CEnterKeyDialog : public QDialog {
    Q_OBJECT
public:
    CEnterKeyDialog(CDatabase &db, QWidget *parent = 0);
    ~CEnterKeyDialog();

    QString key();

protected:
    void changeEvent(QEvent *e);

private:
    Ui::CEnterKeyDialog *m_ui;
    CDatabase &m_db;
    bool m_isNew;
    QString m_key;

private slots:
    void checkKey(const QString&);
};

#endif // CENTERKEYDIALOG_H
